/*
 * @Author: Qimu
 * @Date: 2020-04-22 22:39:04
 * @LastEditors: Qimu
 * @LastEditTime: 2020-09-09 16:35:48
 * @Description: file content
 * @FilePath: \vue-admin-koa2\vue-admin\src\request\api\author.js
 */
/**
 * 权限管理接口列表
 */
import axios from '@/request/http'; // 导入http中axios封装方法
import qs from 'qs'; // 导入qs模块

export default {
  //一级菜单设置表单   
  setMenu(params) {
    return axios.post('/menu/set', {
      params: qs.parse(params)
    });
  },
  //二级菜单设置表单   
  setSubMenu(params) {
    return axios.post('/submenu/set', {
      params: qs.parse(params)
    });
  },
  //菜单栏列表   
  menusList(params) {
    return axios.get('/menu/list', {
      params: qs.parse(params)
    });
  },
  //编辑菜单
  showEditMenu(params) {
    return axios.patch('/menu/showMenu', params);
  },
  //提交编辑菜单
  putEditMenu(params) {
    return axios.put('/menu/putMenu', params);
  },
  //删除菜单
  deleteMenu(level, id) {
    return axios.delete(`/menu/deleteMenu/${level}/${id}`);
  },
};